package com.cow.service.impl;

import com.cow.dao.DiscussionsDao;
import com.cow.entity.Discussions;
import com.cow.service.DiscussionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 茶叶鉴赏讨论
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class DiscussionServiceImpl implements DiscussionService {
    @Autowired
    private  DiscussionsDao discussionsDao;
    @Override
    public Discussions selectById(Integer id) {
        return discussionsDao.selectById(id);
    }

    @Override
    public Discussions selectByOrderNo(String orderNo) {
        return discussionsDao.selectByOrderNo(orderNo);
    }

    @Override
    public List<Discussions> selectByUserId(Integer id) {
        return discussionsDao.selectByUserId(id);
    }

    @Override
    public List<Discussions> selectAll() {
        return discussionsDao.selectAll();
    }

    @Override
    public Boolean insertData(Discussions discussions) {
        return discussionsDao.insertData(discussions);
    }

    @Override
    public Boolean updateById(Discussions discussions) {
        return discussionsDao.updateById(discussions);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return discussionsDao.deleteById(id);
    }


}
